﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Blog.Core.DTO.ViewModel.User
{
     
    public class RequestRoleDTO
    {
        /// <summary>
        /// 用户唯一标识
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 角色编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [Display(Name = "角色名称")]
        public string RoleName { get; set; }
        /// <summary>
        /// 角色介绍
        /// </summary>
        [Required]
        [Display(Name = "角色介绍")]
        public string RoleDescription { get; set; }
        [Required]
        [Display(Name = "角色状态")]
        public bool RoleStart { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        public string? CreateName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        [Display(Name = "修改人")]
        public string? UpdateName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 软删除
        /// </summary>
        [Display(Name = "软删除")]
        public int Delete { get; set; }
        /// <summary>
        /// 权限编号集合
        /// </summary>
        public List<RequestRoleItemDTO> PId { get; set; }
    }
    public class RequestRoleItemDTO
    {
        /// <summary>
        /// 主键编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 角色编号
        /// </summary>
        [Required]
        [Display(Name = "角色编号")]
        public int RoleId { get; set; }
        /// <summary>
        ///权限编号
        /// </summary>
        [Required]
        [Display(Name = "权限编号")]
        public int PermissionId { get; set; }
    }
}
